程式設計訣竅


變數命名: 變數暫存於記憶體空間以便接下來使用的資料,不建議將變數以a、b、c等無意義名稱命名。通常使用_連接單字。eg: raw_data。


註解:註解用以說明該程式碼內容,不會進入到程式運行過程中。

eg:

#這就是註解
#註解不會進入程式碼運行過程
#印出hello
print('hello')

#多行註解 「"""」
"""
以下內容會印出
hello
"""

內容參考:第19期Python程式設計入門共學營

#Python






你可能感興趣的文章

[Math] 畢氏定理 Pythagorean theorem (距離公式)

[Math] 畢氏定理 Pythagorean theorem (距離公式)

關於 React 小書:ComponentWillMount, ComponentDidMount, ComponentWillUnmount

關於 React 小書:ComponentWillMount, ComponentDidMount, ComponentWillUnmount

0 - 0.5 的實體伺服器架設

0 - 0.5 的實體伺服器架設






留言討論